package com.otaliastudios.cameraview.livedata

import androidx.annotation.MainThread
import androidx.lifecycle.MutableLiveData
import com.otaliastudios.cameraview.size.Size


class MarkSizeLiveData(val size: Size = Size(1920, 1080)) : MutableLiveData<Size>(size) {

    companion object {
        private lateinit var sInstance: MarkSizeLiveData

        @MainThread
        fun get(): MarkSizeLiveData {
            sInstance = if (Companion::sInstance.isInitialized) {
                sInstance
            } else MarkSizeLiveData()
            return sInstance
        }
    }

}